﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyAdmin/QuanLy.master" AutoEventWireup="true"
    CodeFile="NhaCungCap_AM.aspx.cs" Inherits="MyAdmin_NhaCungCap_AM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <fieldset>
        <legend align="center"><b>Nhà Cung Cấp</b></legend>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
        	<tr>
        		<td align="center">
                  <asp:DetailsView ID="dtNhaCungCap_AM" runat="server" Height="50px" Width="60%" AutoGenerateRows="False"
            BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3"
            CellSpacing="1" DataKeyNames="ID" DataSourceID="LQDSNhaCungCap_AM" GridLines="None"
            HeaderText="Nhà Cung Cấp" OnItemInserted="dtNhaCungCap_AM_ItemInserted" OnItemUpdated="dtNhaCungCap_AM_ItemUpdated">
            <EditRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            <Fields>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="TenDangNhap" HeaderText="Tên Đăng Nhập" SortExpression="TenDangNhap" />
                <asp:TemplateField HeaderText="Mật Khẩu">
                    <ItemTemplate>
                        <asp:Label runat="Server" ID="dd" Text='<%# Eval("MatKhau") %>' />
                    </ItemTemplate>
                    <InsertItemTemplate>
                        <asp:TextBox runat="Server" ID="dd" TextMode="Password" />
                    </InsertItemTemplate>
                    <EditItemTemplate>
                        <asp:Label runat="Server" ID="dd" Text='<%# Eval("MatKhau") %>' />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="WSUrl" HeaderText="WSUrl" SortExpression="WSUrl" />
                <asp:BoundField DataField="Ten" HeaderText="Tên" SortExpression="Ten" />
                <asp:BoundField DataField="DiaChi" HeaderText="Địa Chỉ" SortExpression="DiaChi" />
                <asp:BoundField DataField="SoDT" HeaderText="Số Điện Thoại" SortExpression="SoDT" />
                <asp:BoundField DataField="TenTKNganHang01" HeaderText="Tên TKNH 01" SortExpression="TenTKNganHang01" />
                <asp:BoundField DataField="SoTKNganHang01" HeaderText="Số TKNH 01" SortExpression="SoTKNganHang01" />
                <asp:BoundField DataField="TenTKNganHang02" HeaderText="Tên TKNH 02" SortExpression="TenTKNganHang02" />
                <asp:BoundField DataField="SoTKNganHang02" HeaderText="Số TKNH 02" SortExpression="SoTKNganHang02" />
                <asp:BoundField DataField="QuocGia" HeaderText="Quốc Gia" SortExpression="QuocGia" />
                <asp:CheckBoxField DataField="DaXoa" HeaderText="Đã Xóa" SortExpression="DaXoa" />
                <asp:CommandField CancelText="Hủy" EditText="Cập Nhật" InsertText="Thêm" NewText="Thêm"
                    ShowEditButton="True" ShowInsertButton="True" UpdateText="Cập Nhật" />
            </Fields>
            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="#E7E7FF" 
                          HorizontalAlign="Center" />
            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
        </asp:DetailsView>
               <asp:Label runat="server" Text="Label" ID="lblThongBaoDTView" ForeColor="White" Visible="false"/>
                </td>
        	</tr>
        </table><br />
        <asp:GridView ID="gvDSNhaCungCap_AM" runat="server" AllowPaging="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
            BorderWidth="1px" CellPadding="3" DataKeyNames="ID" DataSourceID="LQDSNhaCungCap_AM"
            GridLines="Vertical" OnPageIndexChanged="gvDSNhaCungCap_AM_PageIndexChanged"
            OnPageIndexChanging="gvDSNhaCungCap_AM_PageIndexChanging" OnSelectedIndexChanged="gvDSNhaCungCap_AM_SelectedIndexChanged"
            Width="100%" OnRowDeleted="gvDSNhaCungCap_AM_RowDeleted">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:CommandField DeleteText="Xóa" SelectText="Chọn" ShowSelectButton="True" />
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="TenDangNhap" HeaderText="Tên Đăng Nhập" SortExpression="TenDangNhap" />
                <asp:BoundField DataField="MatKhau" HeaderText="Mật Khẩu" SortExpression="MatKhau"
                    Visible="False" />
                <asp:BoundField DataField="WSUrl" HeaderText="WSUrl" SortExpression="WSUrl" />
                <asp:BoundField DataField="Ten" HeaderText="Tên" SortExpression="Ten" />
                <asp:BoundField DataField="DiaChi" HeaderText="Địa Chỉ" SortExpression="DiaChi" />
                <asp:BoundField DataField="SoDT" HeaderText="Số Điện Thoại" SortExpression="SoDT" />
                <asp:BoundField DataField="TenTKNganHang01" HeaderText="TenTKNganHang01" SortExpression="TenTKNganHang01"
                    Visible="False" />
                <asp:BoundField DataField="SoTKNganHang01" HeaderText="SoTKNganHang01" SortExpression="SoTKNganHang01"
                    Visible="False" />
                <asp:BoundField DataField="TenTKNganHang02" HeaderText="TenTKNganHang02" SortExpression="TenTKNganHang02"
                    Visible="False" />
                <asp:BoundField DataField="SoTKNganHang02" HeaderText="SoTKNganHang02" SortExpression="SoTKNganHang02"
                    Visible="False" />
                <asp:BoundField DataField="QuocGia" HeaderText="Quốc Gia" SortExpression="QuocGia" />
                <asp:CheckBoxField DataField="DaXoa" HeaderText="Đã Xóa" SortExpression="DaXoa" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="checkXoa" runat="server" AutoPostBack="True" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
        	<tr>
        		<td align="right">
                  <asp:Label ID="lblThongBaoGridView" runat="server" ForeColor="White" Text="Label"></asp:Label>
                     <asp:Button ID="XoaNhieuBUTTON" runat="server" Text="Xóa Đã Chọn" OnClick="XoaNhieuBUTTON_Click" />
                </td>
        	</tr>
        </table>      
      
        <asp:LinqDataSource ID="LQDSNhaCungCap_AM" runat="server" ContextTypeName="DataAccess_Layer.DataClasses_RetailerDataContext"
            EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName=""
            TableName="NhaCungCaps" oninserted="LQDSHoaDon_AM_Inserted" 
            onupdating="LQDSNhaCungCap_AM_Updating">
        </asp:LinqDataSource>
 
    </fieldset>
</asp:Content>
